function setTextBox1(val)
{
    if(val=="")
    {
        document.getElementById("cheque_no").readOnly=true;
        document.getElementById("bank").readOnly=true;
        document.getElementById("branch").readOnly=true;
        document.getElementById("cheque_no").value="";
        document.getElementById("bank").value="";
        document.getElementById("branch").value="";
        document.getElementById('cheque_no').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('bank').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('branch').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
                        
    }
    else if(val=="2")
    {
        document.getElementById("cheque_no").readOnly=false;
        document.getElementById("bank").readOnly=false;
        document.getElementById("branch").readOnly=false;
        document.getElementById('cheque_no').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('bank').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('branch').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
    }
    else if(val=="0")
    {
        document.getElementById("cheque_no").readOnly=true;
        document.getElementById("bank").readOnly=true;
        document.getElementById("branch").readOnly=true;
        document.getElementById("cheque_no").value="";
        document.getElementById("bank").value="";
        document.getElementById("branch").value="";
        document.getElementById('cheque_no').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('bank').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('branch').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
    }
    else
    {
        document.getElementById("cheque_no").readOnly=false;
        document.getElementById("bank").readOnly=false;
        document.getElementById("branch").readOnly=false;
        document.getElementById('ddno').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('bnkname').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
        document.getElementById('bnkbrnch').setAttribute("style","background-color:#ffffff ; border:1px solid #cccccc;");
                        
    }
}